import request from '@/utils/request'

// 查询提现记录列表
export function listCashout(query) {
  return request({
    url: '/order/cashout/list',
    method: 'get',
    params: query
  })
}
// 查询提现记录列表
export function listPayCashout(query) {
  return request({
    url: '/order/cashout/paylist',
    method: 'get',
    params: query
  })
}

// 查询提现记录详细
export function getCashout(id) {
  return request({
    url: '/order/cashout/' + id,
    method: 'get'
  })
}
// 查询提现记录详细
export function getCashoutAmount() {
  return request({
    url: '/order/cashout/getCashoutAmount',
    method: 'get'
  })
}

// 新增提现记录
export function addCashout(data) {
  return request({
    url: '/order/cashout',
    method: 'post',
    data: data
  })
}

// 修改提现记录
export function updateCashout(data) {
  return request({
    url: '/order/cashout',
    method: 'put',
    data: data
  })
}

// 删除提现记录
export function delCashout(id) {
  return request({
    url: '/order/cashout/' + id,
    method: 'delete'
  })
}

// 打款
export function doCashout(id) {
  return request({
    url: '/order/cashout/doCashout/' + id,
    method: 'post'
  })
}

// 导出提现记录
export function exportCashout(query) {
  return request({
    url: '/order/cashout/export',
    method: 'get',
    params: query
  })
}